package com.dormitory_15.dormitory.Dao.Student;

import com.dormitory_15.dormitory.Entity.Student;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface StudentDao {
    //登录
    Student login(@Param("username") String username,@Param("password") String password);
    //注册
    Integer register(Student student);
    //查询用户 用于是否存在 查询对应用户根据账户
    Student findByUsername(String username);
    List<Student> findByName(@Param("name") String name, @Param("origin") String origin);
    List<Student> selectAllStudents();
}
